var http = require("http");
var url = require("url");
var queryString = require("querystring");
var util = require("util");

http
  .createServer(function (request, response) {
    var post = "";
    request.on("data", function (chunk) {
      post += chunk;
    });
    request.on("end", function () {
      post = queryString.parse(post);
      console.log("请求参数为--》", post);
      response.end(util.inspect(post));
    });
    // response.writeHead(200, { "Content-Type": "text/plain; charset=utf-8" });
    // response.end(util.inspect(url.parse(request.url, true)));
  })
  .listen(3000);
